<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'indexposterimage.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script>
			function showmessage(msg){
				if(msg=="success"){
					alert("上传成功");
					$("#imageAddress").val("");
					document.getElementById("imagefile").outerHTML=document.getElementById("imagefile").outerHTML;
				}
			}
	</script>
  </head>
  
  <body>
  		<div align="center">
    		<div style="width: 300px;height: 100px;">
    			<form action="NewAdvertismentAction" method="post" enctype="multipart/form-data" target="fiframe">
    				<table border="1" cellpadding="2px;">
    					<tr>
    						<td>上传图片:</td>
    						<td><input type="file" name="imagefile" id="imagefile"></td>
    					</tr>
    					<tr>
    						<td>图片链接地址:</td>
    						<td><input type="text" name="imageAddress" id="imageAddress" size="30"></td>
    					</tr>
    					<tr>
    						<td colspan="2" align="center">
    							<input type="submit" value="上传">
    							<input type="reset" value="重置">
    						</td>
    					</tr>
    				</table>
    				<iframe name="fiframe" id="fiframe" style="display: none;"></iframe>
    			</form>
    		</div>
    	</div>
  </body>
</html>
